//
//  Config.swift
//  ParkManage
//
//  Created by cf on 2020/9/17.
//  Copyright © 2020 diligrp. All rights reserved.
//

import UIKit

// 缓存模型key
enum CacheKey {
    static let userInfoKey = "UserInfoKey" // 用户缓存模型
    static let timeoutKey = "timeoutKey" // 网络超时缓存模型
}

enum RegExpression {
    /// 手机号
    static let phone = "^(1[3-9])\\d{9}$"
}

struct Configs {

    struct Dimensions {
        
        static let screenWidth: CGFloat = UIScreen.main.bounds.size.width
        static let screenHeight: CGFloat = UIScreen.main.bounds.size.height
        static let APPDELEGATE  = UIApplication.shared.delegate as? AppDelegate
        static var AppWindow = UIApplication.shared.windows[0]
        static let navBarWithStatusBarHeight: CGFloat = AppWindow.windowScene?.statusBarManager?
            .statusBarFrame.height ?? 0 > 20 ? 88 : 64
        static let statusBarHeight: CGFloat = AppWindow.windowScene?.statusBarManager?
            .statusBarFrame.height ?? 0
        static let bottomSafeArea: CGFloat = AppWindow.windowScene?.statusBarManager?
            .statusBarFrame.height ?? 0 > 20 ? 34 : 0
    }

}
